/*
 * Copyright (c) 2020 - present, Inspur Genersoft Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.inspur.edp.sgf.api.service;

import com.inspur.edp.lcm.metadata.api.entity.GspMetadata;
import com.inspur.edp.sgf.api.common.ResourceType;

/**
 * 功能描述:运行时元数据服务接口
 *
 * @ClassName: EapiMetadataRtService
 * @Author: Fynn Qi
 * @Date: 2020/6/23 15:56
 * @Version: V1.0
 */
public interface EapiMetadataRtService {

    /**
     * 创建运行时Eapi元数据
     * @param voMetadata VO元数据
     * @return EAPI元数据
     */
    GspMetadata createRtEapi(GspMetadata voMetadata);

    /**
     * 创建运行时Eapi元数据
     * @param voMetadata VO元数据
     * @param resourceType 资源类型
     * @return EAPI元数据
     */
    GspMetadata createRtEapi(GspMetadata voMetadata, ResourceType resourceType);

    /**
     *  创建运行时Eapi元数据
     * @param voMetadata VO元数据
     * @param eapiMetadataId EAPI元数据ID，由调用方指定ID，如果已经存在指定ID的元数据，则先删除再插入
     * @param resourceType 资源类型
     * @return EAPI元数据
     */
    GspMetadata save(GspMetadata voMetadata, String eapiMetadataId,ResourceType resourceType);

    /**
     * 根据依赖的VO元数据更新运行时Eapi元数据
     * @param metadataId 更新的元数据ID
     * @param voMetadata VO元数据
     * @return EAPI元数据
     */
    GspMetadata updateRtEapi(String metadataId,GspMetadata voMetadata);

    /**
     * 根据依赖的VO元数据更新运行时Eapi元数据
     * @param metadataId 更新的元数据ID
     * @param voMetadata VO元数据
     * @param resourceType 资源类型
     * @return EAPI元数据
     */
    GspMetadata updateRtEapi(String metadataId,GspMetadata voMetadata,ResourceType resourceType);
}
